Skip to content

Unset bootstrap credentials before exec-ing the server#1412

Open
mkindahl wants to merge 1 commit into
docker-library:masterfrom
mkindahl:fix/unset-envvars
Open

Unset bootstrap credentials before exec-ing the server#1412
mkindahl wants to merge 1 commit into
docker-library:masterfrom
mkindahl:fix/unset-envvars

Conversation

@mkindahl
Copy link
Copy Markdown

POSTGRES_PASSWORD (and related vars) are only needed during initdb and the temporary-server initialisation phase. After that they serve no purpose, but remain in the process environment for the entire lifetime of the container, where any loaded C extension can read them via environ.

Unsetting them immediately before the final exec ensures the running PostgreSQL server process starts with a clean environment.

POSTGRES_PASSWORD (and related vars) are only needed during initdb and
the temporary-server initialisation phase. After that they serve no
purpose, but remain in the process environment for the entire lifetime
of the container, where any loaded C extension can read them via
environ.

Unsetting them immediately before the final exec ensures the running
PostgreSQL server process starts with a clean environment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant